>- Is there a function that will take a symbol patter (say '(a b c d)) and
>produce all possible permutations of it (including ones not obtainable via
>symbol-scroll such as '(a c d b))?
It's on the MRAC, but since I have also written that function I can
send it to you. Here it comes, copy the code into a file and save it
in SCOM 4.0/Environment/Extensions folder. All files there will be loaded
at startup time. Use flatten to get rid of sublists if you need.
; gen-permutation
#|
(gen-permutation '(a b c d))
--> ((a b c d) (a b d c) (a c b d) (a c d b) (a d b c) (a d c b) (b a c d) (b a d c) (b c a d) (b c d a) (b d a c) (b d c a) (c a b d) (c a d b) (c b a d) (c b d a) (c d a b) (c d b a) (d a b c) (d a c b) (d b a c) (d b c a) (d c a b) (d c b a))
(flatten (gen-permutation '(a b c d)))
--> (a b c d a b d c a c b d a c d b a d b c a d c b b a c d b a d c b c a d b c d a b d a c b d c a c a b d c a d b c b a d c b d a c d a b c d b a d a b c d a c b d b a c d b c a d c a b d c b a)